<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>lesson 15</title>
  <script src="https://unpkg.com/vue@next"></script>
</head>

<body>
  <div id="root"></div>
</body>
<script>
  const Child = {
    //2.子组件props接收 使用
    props: ['content'],
    template: `<div>{{content}}</div>`
  }
  const app = Vue.createApp({
    data() {
      return {
        content: "父组件传给子组件的值"
      }
    },
    //1.通过给子组件的属性传值
    template: `<div><Child :content="content"/></div>`,
    components: {
      Child
    }
  })
  app.mount('#root')
</script>

</html>